﻿@{
    Layout = null;
}
<div class="panel-body" style="padding:0">
    <div class="panel panel-default">
        <div class="panel-heading"></div>
        <div class="panel-body">
            <form id="formSearch" class="form-horizontal">
                <div class="form-group">
                    <label class="control-label" for="merchantname_search">商户名称:</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" id="merchantname_search" placeholder="请输入商户名称">
                    </div>
                    <label class="control-label" for="number_search">结算号:</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" id="number_search" placeholder="请输入商户结算号">
                    </div>
                    <label class="control-label" for="settlementstatus_search">结算状态:</label>
                    <div class="col-sm-2">
                        <select class="form-control" id="settlementstatus_search">
                            <option value="-1">全部</option>
                            <option value="1">已提交</option>
                            <option value="2">已完成</option>
                            <option value="3">失败</option>
                            <option value="4">取消</option>
                        </select>
                    </div>
                    <div class="col-sm-3">
                        <button type="button" id="btnQueryList" class="btn btn-primary"><i class="fa fa-search"></i>查询</button>
                        <button type="button" id="btnReset" class="btn btn-primary"><i class="fa fa-remove"></i>清空</button>
                    </div>
                </div>
            </form>
            <hr />
            <div>
                <table id="settlementinfo"></table>
            </div>
        </div>
    </div>
</div>

<div id="toolbar" class="btn-group">
    <button id="btnSettlementStatusComplete" type="button" class="btn btn-primary"><span><i class="fa fa-plug"></i>&nbsp;确认打款</span></button>
    <button id="btnSettlementStatusFailure" type="button" class="btn btn-primary"><span><i class="fa fa-plug"></i>&nbsp;失败</span></button>
    <button id="btnSettlementStatusCancel" type="button" class="btn btn-primary"><span><i class="fa fa-plug"></i>&nbsp;取消</span></button>
</div>

@* 修改结算状态为完成 *@
<div class="modal fade" id="SettlementStatusSuccessModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle">商户申请打款信息</h4>
            </div>
            <div class="modal-body">
                <form id="SettlementStatusSuccessOperation" method="post" class="form-horizontal">
                    <input type="hidden" name="success_id" id="success_id" />
                    <div class="form-group">
                        您确认要给商户（<span id="Success_Head_Title_OK">***</span>）打款吗，打款之后无法撤回，请您确认
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnSettlementStatusOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

@* 修改结算状态Revoke：*@
<div class="modal fade" id="SettlementStatusRevokeModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle_Revoke"></h4>
            </div>
            <div class="modal-body">
                <form id="SettlementStatusRevokeOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="settle_id" name="settle_id" />
                    <div class="form-group">
                        您确认要<span id="Title_Revoke"></span>该结算单吗？
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">原因:</span>
                            <textarea id="Remark" name="Remark" class="form-control" />
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnSettlementStatusRevokeOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

<script src="~/Scripts/project/min/settlement.min.js"></script>
<script type="text/javascript">
    $(function () {
        ml.admin.settlement.init();
    })
</script>